package com.uinnova.springboot.configuration;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.validation.annotation.Validated;

import java.util.List;
import java.util.Map;

/**
 * 实体类
 * @configrutation 该类为配置类
 * @Validated 校验数据，抛出异常时异常中心统一处理
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "jail")
@Validated
public class JailYml {
    private static final long serialVersionUID = -3121014482699811629L;
    private String fileConfig;
    private String file;
    private String classPathConfig;
    private String classPath;
    private String path;
    private String path1;
    private String path2;
    private String path3;
    private String path4;
    private String name;
    private String agel;
    private App app;
    private List<Menus> menus;
    private Map<String,String> map;



    @Data
    private static class App{
        private String name;
        private String url;
        private String version;
    }

    @Data
    private static class Menus {
        private String title;
        private String name;
        private String path;
    }

}
